package com.kaibes.core.base.util;

import java.util.Map;
import java.util.Set;

public class MapUtils {

    public static boolean isEmpty(Map<?, ?> map) {
        return map == null || map.isEmpty();
    }
    
    public static boolean isNotEmpty(Map<?, ?> map) {
        return map != null && !map.isEmpty();
    }
    
    public static void keyHumpToLine(Map<String, Object> map) {
        Set<Map.Entry<String, Object>> set = map.entrySet();
        for (Map.Entry<String, Object> entry : set) {
            String key = entry.getKey();
            if (StringUtils.isHump(key)) {
                Object value = entry.getValue();
                map.remove(key);
                key = StringUtils.humpToLine(key);
                map.put(key, value);
            }
        }
    }
}
